"""
embedding_config.py 模块
嵌入模型的配置类
"""
from dataclasses import dataclass
import os
from dotenv import load_dotenv

load_dotenv()

@dataclass
class EmbeddingConfig:
    """嵌入模型配置类"""
    model_name: str = os.getenv("EMBEDDING_MODEL_NAME", "BAAI/bge-small-zh-v1.5")
    device: str = os.getenv("EMBEDDING_DEVICE", "auto")
    # 模型路径优先使用环境变量，否则自动从model_name下载
    model_path: str = os.getenv("EMBEDDING_MODEL_PATH", f"./models/embeddings/{model_name.split('/')[-1]}")
